package com.zz.common;

import lombok.Data;

@Data
public class Result {

    private String code;

    private String message;

    private Object data;

    public Result() {

    }

    public Result(String code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public static Result resultSuccess(Object data) {
        return new Result("0000", "执行成功", data);
    }

    public static Result resultFail(Object data) {
        return new Result("9999", "执行失败", data);
    }
}
